\(\int \cos (c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx\) [191]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 33 \[ \int \cos (c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \sin ^2(c+d x)}{2 d}+\frac {a \sin ^3(c+d x)}{3 d} \]

[Out]

1/2*a*sin(d*x+c)^2/d+1/3*a*sin(d*x+c)^3/d

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2912, 12, 45} \[ \int \cos (c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \sin ^3(c+d x)}{3 d}+\frac {a \sin ^2(c+d x)}{2 d} \]

[In]

Int[Cos[c + d*x]*Sin[c + d*x]*(a + a*Sin[c + d*x]),x]

[Out]

(a*Sin[c + d*x]^2)/(2*d) + (a*Sin[c + d*x]^3)/(3*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2912

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {x (a+x)}{a} \, dx,x,a \sin (c+d x)\right )}{a d} \\ & = \frac {\text {Subst}(\int x (a+x) \, dx,x,a \sin (c+d x))}{a^2 d} \\ & = \frac {\text {Subst}\left (\int \left (a x+x^2\right ) \, dx,x,a \sin (c+d x)\right )}{a^2 d} \\ & = \frac {a \sin ^2(c+d x)}{2 d}+\frac {a \sin ^3(c+d x)}{3 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.91 \[ \int \cos (c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx=\frac {-3 a \cos (2 (c+d x))+4 a \sin ^3(c+d x)}{12 d} \]

[In]

Integrate[Cos[c + d*x]*Sin[c + d*x]*(a + a*Sin[c + d*x]),x]

[Out]

(-3*a*Cos[2*(c + d*x)] + 4*a*Sin[c + d*x]^3)/(12*d)

Maple [A] (verified)

Time = 0.07 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.85

method result size
derivativedivides \(\frac {\frac {a \left (\sin ^{3}\left (d x +c \right )\right )}{3}+\frac {a \left (\sin ^{2}\left (d x +c \right )\right )}{2}}{d}\) \(28\)
default \(\frac {\frac {a \left (\sin ^{3}\left (d x +c \right )\right )}{3}+\frac {a \left (\sin ^{2}\left (d x +c \right )\right )}{2}}{d}\) \(28\)
parallelrisch \(-\frac {a \left (-3-3 \sin \left (d x +c \right )+\sin \left (3 d x +3 c \right )+3 \cos \left (2 d x +2 c \right )\right )}{12 d}\) \(37\)
risch \(\frac {a \sin \left (d x +c \right )}{4 d}-\frac {a \sin \left (3 d x +3 c \right )}{12 d}-\frac {a \cos \left (2 d x +2 c \right )}{4 d}\) \(44\)
norman \(\frac {\frac {2 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {8 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}\) \(69\)

[In]

int(cos(d*x+c)*sin(d*x+c)*(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(1/3*a*sin(d*x+c)^3+1/2*a*sin(d*x+c)^2)

Fricas [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.18 \[ \int \cos (c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx=-\frac {3 \, a \cos \left (d x + c\right )^{2} + 2 \, {\left (a \cos \left (d x + c\right )^{2} - a\right )} \sin \left (d x + c\right )}{6 \, d} \]

[In]

integrate(cos(d*x+c)*sin(d*x+c)*(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

-1/6*(3*a*cos(d*x + c)^2 + 2*(a*cos(d*x + c)^2 - a)*sin(d*x + c))/d

Sympy [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.24 \[ \int \cos (c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx=\begin {cases} \frac {a \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {a \sin ^{2}{\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (a \sin {\left (c \right )} + a\right ) \sin {\left (c \right )} \cos {\left (c \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(cos(d*x+c)*sin(d*x+c)*(a+a*sin(d*x+c)),x)

[Out]

Piecewise((a*sin(c + d*x)**3/(3*d) + a*sin(c + d*x)**2/(2*d), Ne(d, 0)), (x*(a*sin(c) + a)*sin(c)*cos(c), True
))

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.85 \[ \int \cos (c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx=\frac {2 \, a \sin \left (d x + c\right )^{3} + 3 \, a \sin \left (d x + c\right )^{2}}{6 \, d} \]

[In]

integrate(cos(d*x+c)*sin(d*x+c)*(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/6*(2*a*sin(d*x + c)^3 + 3*a*sin(d*x + c)^2)/d

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.85 \[ \int \cos (c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx=\frac {2 \, a \sin \left (d x + c\right )^{3} + 3 \, a \sin \left (d x + c\right )^{2}}{6 \, d} \]

[In]

integrate(cos(d*x+c)*sin(d*x+c)*(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

1/6*(2*a*sin(d*x + c)^3 + 3*a*sin(d*x + c)^2)/d

Mupad [B] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.73 \[ \int \cos (c+d x) \sin (c+d x) (a+a \sin (c+d x)) \, dx=\frac {a\,{\sin \left (c+d\,x\right )}^2\,\left (2\,\sin \left (c+d\,x\right )+3\right )}{6\,d} \]

[In]

int(cos(c + d*x)*sin(c + d*x)*(a + a*sin(c + d*x)),x)

[Out]

(a*sin(c + d*x)^2*(2*sin(c + d*x) + 3))/(6*d)